home *** CD-ROM | disk | FTP | other *** search
/ Power Bytes: Money & Finance / PowerBytes Money and Finance CD-ROM 01 / PowerBytes Money and Finance CD-ROM 01.iso / Utilities / RA / RA Samples / NewStrings.ra < prev    next >
Encoding:
Text File  |  1986-12-11  |  1.4 KB  |  71 lines  |  [THED/THTH]

  1. |
  2. |  RA¬
  3. |  String functions
  4. |
  5. |   ⌐ 1986 COM~LINK & S.Koren
  6. |
  7. #M;
  8. "Ver 0.2 of RA now has the following!new string functions:!!"
  9. "query for string!string length!"
  10. "find substring!concatenate strings!"
  11. "insert substring!delete substring!copy substring"
  12. #A;
  13. "Enter any string : "
  14. └               | ask user for string
  15. Aá╢
  16. "!You entered the string: " A╢ áá
  17. "!The length of the string is: " A╢ 
  18. ü !             | print the length of the string
  19. "!Enter another string: "└
  20. Bá╢
  21. "!The second string was: " B╢ áá 
  22. "!The length of the string is: " B╢ ü !"!"
  23. A╢ B╢ ╫ A:     | find position of a in b
  24. A. [A╢ "'"áá"' was a substring of '" B╢ áá "'!in position " A. ! "!"]
  25. A.º [A╢ "'"áá "' was not a substring of '" B╢ áá"'!"]
  26. A╢ B╢ 
  27. «              | concatenate the strings
  28.  
  29. "'" Cá╢ C╢áá "' is the concatenated string.!"
  30. "Its length is " C╢ü ! "."
  31. #A;
  32. áaaaaaaá Aá╢ A╢ áá " is string A!"
  33. ábbbbá Bá╢ B╢ áá " is string B!"
  34. A╢ B╢ 3 á+ Cá╢ C╢ áá " is string A inserted !in string B at position 3.!"
  35. C╢ 3 3 á- áá " is that string with!"
  36. "positions 3 thru 6 deleted.!"
  37. áThis is a test stringá Aá╢
  38. A╢ áá
  39. "!"
  40. A╢ 2 7 áì "'"áá"'" " is the substring from !location 2 thru 7.!"
  41. #A;
  42. "THE END."
  43.  
  44. $
  45. &A
  46. "!Hit any key: " ?ñ ╡ @`
  47. |
  48. |  RA title routine
  49. |
  50. &M
  51. #P,5,5;
  52. #G,10,10;
  53. #L,225,10;
  54. #L,225,105;
  55. #L,10,105;
  56. #L,10,10; 
  57. #O; #Q;`
  58.  
  59. &G 1% 2% Ñ0A893╝ª `
  60. &L 1% 2% Ñ0A891╝ª `
  61. &O
  62. 40 100 ╜
  63. "RA¬"
  64. 60 40 ╜ 
  65. "⌐ 1986/7 COM~LINK & S.Koren" 
  66. 80 60 ╜
  67. "All rights reserved." `
  68. &P 1% 2% Ñ0A89B╝ª `
  69. &Q ?ñ @ ╡`
  70. $
  71.